package com.sc.web.gwt.client.service;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.sc.web.gwt.shared.model.Admin;

import java.util.List;

/**
 * com.sc.web.gwt.client.service
 * Author: AVAVT
 * Date: 8/10/11
 * Time: 1:22 AM
 */
@RemoteServiceRelativePath("AdminDataManagementService")
public interface AdminDataManagementService extends RemoteService {

    List<Admin> getAllAdmins();

    boolean saveOrUpdateAdminData(Admin agentAdmin);

    Admin getAdminInfo();



    /**
     * Utility/Convenience class.
     * Use AdminDataManagementService.App.getInstance() to access static instance of AdminDataManagementServiceAsync
     */
    public static class App {
        private static final AdminDataManagementServiceAsync ourInstance = (AdminDataManagementServiceAsync) GWT.create(AdminDataManagementService.class);

        public static AdminDataManagementServiceAsync getInstance() {
            return ourInstance;
        }
    }
}
